package com.lxw.study.structural.proxy.dynamicproxy.proxyfactory.advice;

import lombok.extern.slf4j.Slf4j;
import org.springframework.aop.ThrowsAdvice;

import java.lang.reflect.Method;
import java.util.Arrays;

@Slf4j
public class MyThrowsAdvice implements ThrowsAdvice {

	public void afterThrowing(Method method, Object[] args, Object target, NullPointerException ex) {
        log.info("方法抛出异常后执行 方法:{},入参:{},异常:{}",method.getName(), Arrays.toString(args),ex.getMessage());
	}

}
